home *** CD-ROM | disk | FTP | other *** search
/ Aminet 12 / Aminet 12 (1996)(GTI - Schatztruhe)[!][Jun 1996].iso / Aminet / dev / misc / TechLib.lha / TechLib / tech.doc < prev    next >
Encoding:
Text File  |  1996-03-24  |  5.9 KB  |  204 lines

  1. TABLE OF CONTENTS
  2.  
  3. tech.lib/CloseTech
  4. tech.lib/InitTech
  5. tech.lib/NumRexxFnc
  6. tech.lib/RexxCmd
  7. tech.lib/RexxFnc
  8. tech.lib/SendBBSMsg
  9.  
  10. tech.lib/CloseTech                                      tech.lib/CloseTech
  11.  
  12.    NAME
  13.         CloseTech -- cleanup after the library
  14.  
  15.    SYNOPSIS
  16.         CloseTech()
  17.  
  18.         void CloseTech(void)
  19.  
  20.    FUNCTION
  21.         This function will free everything allocated by InitTech() or
  22.         any other tech.lib function you may have called. This function
  23.         *MUST* be called before exiting your program. You may not call
  24.         any tech.lib function after calling this function.
  25.  
  26.         The function sends a message to TechCon decrementing the opencount
  27.         if it was incremented, and then free the ARexx message port and
  28.         finally close the ARexx library rexxsyslib.library.
  29.  
  30.    INPUTS
  31.  
  32.    RESULT
  33.  
  34.    BUGS
  35.  
  36.    SEE ALSO
  37.         InitTech()
  38.  
  39. tech.lib/InitTech                                       tech.lib/InitTech
  40.  
  41.    NAME
  42.         InitTech -- initialize the library operations
  43.  
  44.    SYNOPSIS
  45.         InitTech()
  46.  
  47.         void InitTech(void)
  48.  
  49.    FUNCTION
  50.         To initialize tech.lib for use. This function *MUST* be called
  51.         first before calling any other tech.lib function. Remember to
  52.         call CloseTech() respectively when you finish.
  53.  
  54.         This function opens rexxsyslib.library, creates a message port
  55.         for ARexx activity and sends a message to TechCon incrementing
  56.         the opencount.
  57.  
  58.    INPUTS
  59.  
  60.    RESULT
  61.  
  62.    BUGS
  63.  
  64.    SEE ALSO
  65.         CloseTech()
  66.  
  67. tech.lib/NumRexxFnc                                     tech.lib/NumRexxFnc
  68.  
  69.    NAME
  70.         NumRexxFnc -- Call a numeric ARexx function
  71.  
  72.    SYNOPSIS
  73.         result = NumRexxFnc(function)
  74.  
  75.         long NumRexxFnc(u_char *)
  76.  
  77.    FUNCTION
  78.         This function calls an ARexx function that returns a numeric
  79.         value. It operates similarly to RexxFnc(), but instead of a string,
  80.         it returns you a numeric value. If the port was not found, or the
  81.         function failed, you will get a zero. Actually, this function is
  82.         a "frontend" for RexxFnc(). It calls it and then converts the
  83.         return string to a numeric value. You see, all ARexx functions
  84.         return a character string, whether it is an actual string or
  85.         a number.
  86.  
  87.         Note that a zero might not indicate an error. It may be a valid
  88.         return value from the function. If the return string is invalid,
  89.         ie. not a valid number, you will get -1. Note that -1 might also
  90.         be a valid return.
  91.  
  92.    INPUTS
  93.         function - ARexx function string
  94.  
  95.    RESULT
  96.         result - numeric value returned by the function
  97.  
  98.    BUGS
  99.  
  100.    SEE ALSO
  101.         RexxFnc()
  102.  
  103. tech.lib/RexxCmd                                        tech.lib/RexxFnc
  104.  
  105.    NAME
  106.         RexxCmd -- Send an ARexx command
  107.  
  108.    SYNOPSIS
  109.         result = RexxCmd(command)
  110.  
  111.         ULONG RexxCmd(UBYTE *)
  112.  
  113.    FUNCTION
  114.         This function will send an ARexx command to the specified port.
  115.         Put the name of the port in the global buffer called APortName.
  116.         The buffer is maintained by tech.lib. The function will create
  117.         a rexx message using rexxsyslib.library and send it to the port.
  118.         Then it will wait for a reply and check the return code. If it
  119.         is zero, everything is OK. Otherwise the function will pass you
  120.         the error code returned.
  121.  
  122.    INPUTS
  123.         command - ARexx command string
  124.  
  125.    RESULT
  126.         result - 0 if everything went OK, or 1 if no port or error returned
  127.  
  128.    BUGS
  129.  
  130.    SEE ALSO
  131.  
  132. tech.lib/RexxFnc                                        tech.lib/RexxCmd
  133.  
  134.    NAME
  135.         RexxFnc -- Call an ARexx function
  136.  
  137.    SYNOPSIS
  138.         result = RexxFnc(function)
  139.  
  140.         u_char *RexxFnc(u_char *)
  141.  
  142.    FUNCTION
  143.         This function calls an ARexx function and return you the string
  144.         it got back from it. If the function failed for some reason, or
  145.         the port was not found, you will get a NULL pointer.
  146.  
  147.    INPUTS
  148.         function - ARexx function string
  149.  
  150.    RESULT
  151.         result - Pointer to a string returned by the function
  152.  
  153.    BUGS
  154.  
  155.    SEE ALSO
  156.         NumRexxFnc()
  157.  
  158. tech.lib/SendBBSMsg                                     tech.lib/SendBBSMsg
  159.  
  160.    NAME
  161.         SendBBSMsg -- Send a command or request to TechCon
  162.  
  163.    SYNOPSIS
  164.         outdata = SendBBSMsg(command, indata)
  165.  
  166.         void *SendBBSMsg(UWORD, void *)
  167.  
  168.    FUNCTION
  169.         This function sends a BBS message to TechCon. You can do lots of
  170.         things with BBS messages. For more information about them, refer
  171.         to the TechnoBBS programmer's manual. The command will be sent and
  172.         a reply waited for. If the operation succeeded, you will get a
  173.         pointer to the data returned by TechCon. NULL indicates TechCon
  174.         was not running, or its private port was not found for some reason.
  175.  
  176.         First the command will initialize a BBSMsg structure with the
  177.         information you provide. Then it will find the TechCon port and
  178.         send the message if found. Finally, it waits for a reply and
  179.         extracts the return value from the BBSMsg structure for you.
  180.         The address of the TechCon's private port is kept in a global
  181.         variable called TCP. It is updated each time you call this
  182.         function, and you can check it after the call has returned,
  183.         to see if TechCon was up.
  184.  
  185.         This is not necessary using tech.lib however. The first time
  186.         it sends a BBS message, is when you call InitTech(), and it
  187.         will also check the TCP variable. If it is NULL, your program
  188.         will exit. After that, it will be valid, because TechCon will
  189.         not exit while your program is running due to the fact, that
  190.         we have incremented the opencount. TechCon will exit only when
  191.         there are no openers.
  192.  
  193.    INPUTS
  194.         command - Command ID, see include/techprg.h
  195.         indata  - Any data passed to TechCon for the command
  196.  
  197.    RESULT
  198.         outdata - Pointer to any data returned by TechCon or NULL
  199.  
  200.    BUGS
  201.  
  202.    SEE ALSO
  203.  
  204.